<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>2-12</title>
		<!--   引入jQuery -->
		<script src="../../scripts/jquery-1.3.1.js" type="text/javascript"></script>
		<script src="../../scripts/assist.js" type="text/javascript"></script>
		<link rel="stylesheet" type="text/css" href="../../styles/selectstyle.css" />
		<script type="text/javascript">
			$(function() {
				$text = "有" + $("#form1 :text").length + "个(:text元素)" + "</br>"
				$password = "有" + $("#form1 :password").length + "个(:password元素)" + "</br>"
				$radio = "有" + $("#form1 :radio").length + "个(:radio元素)" + "</br>"
				$checkbox = "有" + $("#form1 :checkbox").length + "个(:checkbox元素)" + "</br>"
				$submit = "有" + $("#form1 :submit").length + "个(:submit元素)" + "</br>"
				$image = "有" + $("#form1 :image").length + "个(:image元素)" + "</br>"
				$reset = "有" + $("#form1 :reset").length + "个(:reset元素)" + "</br>"
				$button = "有" + $("#form1 :button").length + "个(:button元素)" + "</br>"
				$file = "有" + $("#form1 :file").length + "个(:file元素)" + "</br>"
				$hidden = "有" + $("#form1 :hidden").length + "个(:hidden元素)" + "</br>"
				$select = "有" + $("#form1 :select").length + "个(:select元素)" + "</br>"
				$textarea = "有" + $("#form1 :textarea").length + "个(:textarea元素)" + "</br>"
				$input = "有" + $("#form1 input").length + "个(input元素)" + "</br>"
				$inputs = "有" + $("#form1 :input").length + "个(:input元素)" + "</br>"

				$("div").eq(1).append($text + $password + $radio + $checkbox + $submit + $image + $reset + $button + $file +
					$hidden + $select + $textarea + $input + $inputs).css("color", "red").css("height", "320px")
			})
		</script>
	</head>
	<body>
		<form id="form1" action="#">
			<input type="button" value="Button" /><br />
			<input type="checkbox" name="c" />1<input type="checkbox" name="c" />2<input type="checkbox" name="c" />3<br />
			<input type="file" /><br />
			<input type="hidden" />
			<div style="display:none">test</div><br />
			<input type="image" /><br />
			<input type="password" /><br />
			<input type="radio" name="a" />1<input type="radio" name="a" />2<br />
			<input type="reset" /><br />
			<input type="submit" value="提交" /><br />
			<input type="text" /><br />
			<select>
				<option>Option</option>
			</select><br />
			<textarea rows="5" cols="20"></textarea><br />
			<button>Button</button><br />
		</form>
		<div></div>
	</body>
</html>
